What you have is a 256 *line* encoder, not a 256 count encoder. Each line has 2 edges, and there are two channels, so a 256 line encoder gives 1024 counts.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "quelisto" <quelisto@...> wrote:
>
> Hi Tom, I think maybe my troubles with the BLDC have something to do with the afforementioned curiousity. I checked the documentation on my encoder, and sure enough, it is a more standard 256 count per rev encoder (not a 512 CPR). I am using the Kanalog Diff 0 input for the interface, using ch#->InputChan0= Encoder0_Channel.
>
> I wrote a little program to watch the position as I turn the shaft by hand, and sure enough, I repeatably get +1024 counts going one way, -1024 going the other.
>
> I have tried a bunch of permutation/combinations for both the inv_Dist adn the commutator offset (1/256, 1/512, 1/128; 32, 64, 128, 256). None work.
>
> So...any advice?
>
|
|